Skip to content

Conversation

@kinke
Copy link
Member

@kinke kinke commented Nov 9, 2025

A revised #4979.

@JohanEngelen
Copy link
Member

JohanEngelen commented Nov 9, 2025

let's add the testcase that breaks without the fix of #5015

@thewilsonator
Copy link
Contributor

Test case is

struct CodepointSet
{
    CodepointSet opBinary(string op, U)(U )
    {
        return this;
    }

    this(this) { }
}

CodepointSet memoizeExpr(string expr)()
{
    if (__ctfe)
        return mixin(expr);
    CodepointSet slot;
    return slot;
}

void wordCharacter() {
    // TODO: Check for no call to @llvm.lifetime for `__copytmp` sret
    memoizeExpr!"unicode.A | unicode.M";
}

struct unicode
{
    static CodepointSet opDispatch(string name)()
    {
        CodepointSet set;
        return set;
    }
}

struct Grapheme
{
    /// Ctor
    this(C)(C) { }

    this(this) { }

    ~this()    { }
}

enum jamoLBase = 0x1100;

Grapheme decomposeHangul(dchar ch) {
    immutable idxS = ch ;
    immutable idxT = idxS ;

    immutable partL = jamoLBase ;
    //TODO: Check for no call to `@llvm.lifetime` for `__sl` sret
    if (idxT )
        return Grapheme(partL);
    return Grapheme();
}

@thewilsonator
Copy link
Contributor

#5022

@thewilsonator thewilsonator merged commit 3883e04 into ldc-developers:master Nov 12, 2025
21 checks passed
@kinke kinke deleted the llvm22_lifetime branch November 12, 2025 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants